package org.erepublik.company.thread;

import javax.servlet.ServletContextEvent;
import javax.servlet.ServletContextListener;

import org.erepublik.company.product.Ticket;
import org.erepublik.company.scanner.TicketScanner;

public class TicketListener implements ServletContextListener {

    public void contextDestroyed(ServletContextEvent arg0) {
    }

    public void contextInitialized(ServletContextEvent arg0) {
        System.out.println("odpalam watek updatujacy tickety...");
        ProductUpdater<Ticket> foodUpdater = new ProductUpdater<Ticket>("ticket", 1000*60*60, new TicketScanner());
        foodUpdater.start();
    }

}